package com.team.sion.service.Impl;

import com.team.sion.mapper.AdminMapper;
import com.team.sion.pojo.Admin;
import com.team.sion.pojo.AdminExample;
import com.team.sion.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public List<Admin> findAdmin(Admin admin) {
        AdminExample example = new AdminExample();
        example.createCriteria().andNameEqualTo(admin.getName()).andPasswordEqualTo(admin.getPassword());
        return adminMapper.selectByExample(example);
    }
}
